package com.cqcvc.mapper;

import com.cqcvc.entity.Permission;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Set;

/**
 * @author hunter
 * @since 2022-08-04
 */
@Mapper
public interface PermissionMapper extends BaseMapper<Permission> {
    //根据用户名获取权限
    Set<String> selectPermissionByUsername(String username);
    //根据用户名获取父菜单
    List<Permission> selectFatherPermissionsByUsername(String username);
    //根据父id获取子权限
    //List<Permission> selectSubPermissionsByFatherId(int fatherId);
    List<Permission> selectSubPermissionsByFatherId(String username,int fatherId);
}
